<?php
// +----------------------------------------------------------------------
// | Tplay [ WE ONLY DO WHAT IS NECESSARY ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017 http://tplay.pengyichen.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 听雨 < 389625819@qq.com >
// +----------------------------------------------------------------------


namespace app\admin\model;

use \think\Model;
class Cla extends Model
{
    public function school()
    {
        return $this->hasOne('School','xid','xid');
    }
    public function stu()
    {
        return $this->hasMany('Stu','cid','cid');
;
    }
    // public function index()
    // {
    //     $product = Cla::with(['stu'=>function($query){
    //         $query->with(['stu'])->order('order','sid');
    //     }])->find();
    // }
}
